﻿using AutoTest.Business.Dto.UserInfo;
using AutoTest.Common.Extension;
using AutoTest.Domain.Entities;
using AutoTest.Domain.Enums;
using SqlSugar;

namespace AutoTest.Business.Vo.UserInfo
{
    /// <summary>
    /// 用户列表
    /// </summary>
    public class UserInfoListVo
    {
        ///<summary>
		/// 主键ID
		///</summary>
        public long Id { get; set; } = 0;
        ///<summary>
        /// 用户名
        ///</summary>
        public string UserName { get; set; } = string.Empty;
        ///<summary>
        /// 电话
        ///</summary>
        public string Phone { get; set; } = string.Empty;
        ///<summary>
        /// 邮箱地址
        ///</summary>
        public string Email { get; set; } = string.Empty;
        ///<summary>
        /// 性别，0：位置；1：男；2：女
        ///</summary>
        public EnumSex Sex { get; set; } = EnumSex.Unknown;
        /// <summary>
        /// 性别描述
        /// </summary>
        public string SexDisplay => Sex.GetDescription();
        /// <summary>
        /// 市
        ///</summary>
        public string City { get; set; } = string.Empty;

        ///<summary>
        /// 注册时间
        ///</summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;
        ///<summary>
        /// 有效时间
        ///</summary>
        public DateTime ValidTime { get; set; } = DateTime.Now;

        ///<summary>
        /// 有效状态，0：无效；1：有效
        ///</summary>
        public EnumStatus Status { get; set; } = EnumStatus.Enable;

        /// <summary>
        /// 开通产品
        /// </summary>
        public List<UserProductRelation> Products { get; set; } = [];
    }
}
